package com.example.springboot.mapper;

import com.example.springboot.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProductMapper {
    @Select("SELECT id,title, pic_path AS picPath, original_price AS originalPrice, " +
        "sale_price AS salePrice, procity, realSales, nick, detail_url AS detailUrl, " +
        "created_at AS createdAt, updated_at AS updatedAt " +
        "FROM products")
    List<Product> findAllProduct();

}
